<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9"/>
<title>NGUI: UIDraggableCamera Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">NGUI
   &#160;<span id="projectnumber">3.11.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_u_i_draggable_camera.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#properties">Properties</a> &#124;
<a href="class_u_i_draggable_camera-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">UIDraggableCamera Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Works together with <a class="el" href="class_u_i_drag_camera.html" title="Allows dragging of the camera object and restricts camera&#39;s movement to be within bounds of the area ...">UIDragCamera</a> script, allowing you to drag a secondary camera while keeping it constrained to a certain area.  
 <a href="class_u_i_draggable_camera.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for UIDraggableCamera:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_u_i_draggable_camera.png" usemap="#UIDraggableCamera_map" alt=""/>
  <map id="UIDraggableCamera_map" name="UIDraggableCamera_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0bb55aad206ac90c3da93dbbf42499ca"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a0bb55aad206ac90c3da93dbbf42499ca">ConstrainToBounds</a> (bool immediate)</td></tr>
<tr class="memdesc:a0bb55aad206ac90c3da93dbbf42499ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constrain the current camera's position to be within the viewable area's bounds.  <a href="#a0bb55aad206ac90c3da93dbbf42499ca">More...</a><br /></td></tr>
<tr class="separator:a0bb55aad206ac90c3da93dbbf42499ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39b7f911a2d8fdba5ce710c6f747220e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a39b7f911a2d8fdba5ce710c6f747220e">Press</a> (bool isPressed)</td></tr>
<tr class="memdesc:a39b7f911a2d8fdba5ce710c6f747220e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the bounds of all widgets under this game object.  <a href="#a39b7f911a2d8fdba5ce710c6f747220e">More...</a><br /></td></tr>
<tr class="separator:a39b7f911a2d8fdba5ce710c6f747220e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77ce506db4f2a956578eb4a1ca94484e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a77ce506db4f2a956578eb4a1ca94484e">Drag</a> (Vector2 delta)</td></tr>
<tr class="memdesc:a77ce506db4f2a956578eb4a1ca94484e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drag event receiver.  <a href="#a77ce506db4f2a956578eb4a1ca94484e">More...</a><br /></td></tr>
<tr class="separator:a77ce506db4f2a956578eb4a1ca94484e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3518faa34a2f8fa719c63ad8c977673a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a3518faa34a2f8fa719c63ad8c977673a">Scroll</a> (float delta)</td></tr>
<tr class="memdesc:a3518faa34a2f8fa719c63ad8c977673a"><td class="mdescLeft">&#160;</td><td class="mdescRight">If the object should support the scroll wheel, do it.  <a href="#a3518faa34a2f8fa719c63ad8c977673a">More...</a><br /></td></tr>
<tr class="separator:a3518faa34a2f8fa719c63ad8c977673a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a19b0622bc6a65b9e9fbcd1f5a41b6ecc"><td class="memItemLeft" align="right" valign="top">Transform&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a19b0622bc6a65b9e9fbcd1f5a41b6ecc">rootForBounds</a></td></tr>
<tr class="memdesc:a19b0622bc6a65b9e9fbcd1f5a41b6ecc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Root object that will be used for drag-limiting bounds.  <a href="#a19b0622bc6a65b9e9fbcd1f5a41b6ecc">More...</a><br /></td></tr>
<tr class="separator:a19b0622bc6a65b9e9fbcd1f5a41b6ecc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a73ef4f8b604575f03aca4f24fed2b3"><td class="memItemLeft" align="right" valign="top">Vector2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a4a73ef4f8b604575f03aca4f24fed2b3">scale</a> = Vector2.one</td></tr>
<tr class="memdesc:a4a73ef4f8b604575f03aca4f24fed2b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scale value applied to the drag delta. Set X or Y to 0 to disallow dragging in that direction.  <a href="#a4a73ef4f8b604575f03aca4f24fed2b3">More...</a><br /></td></tr>
<tr class="separator:a4a73ef4f8b604575f03aca4f24fed2b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4926155455c09344307270395123f77f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a4926155455c09344307270395123f77f">scrollWheelFactor</a> = 0f</td></tr>
<tr class="memdesc:a4926155455c09344307270395123f77f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Effect the scroll wheel will have on the momentum.  <a href="#a4926155455c09344307270395123f77f">More...</a><br /></td></tr>
<tr class="separator:a4926155455c09344307270395123f77f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c58d995b931d9823c6c5041f87921f8"><td class="memItemLeft" align="right" valign="top">UIDragObject.DragEffect&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a7c58d995b931d9823c6c5041f87921f8">dragEffect</a> = UIDragObject.DragEffect.MomentumAndSpring</td></tr>
<tr class="memdesc:a7c58d995b931d9823c6c5041f87921f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Effect to apply when dragging.  <a href="#a7c58d995b931d9823c6c5041f87921f8">More...</a><br /></td></tr>
<tr class="separator:a7c58d995b931d9823c6c5041f87921f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a62dbd06539b8529c08c8ee47684d3214"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a62dbd06539b8529c08c8ee47684d3214">smoothDragStart</a> = true</td></tr>
<tr class="memdesc:a62dbd06539b8529c08c8ee47684d3214"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether the drag operation will be started smoothly, or if if it will be precise (but will have a noticeable "jump").  <a href="#a62dbd06539b8529c08c8ee47684d3214">More...</a><br /></td></tr>
<tr class="separator:a62dbd06539b8529c08c8ee47684d3214"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2f5ee4e88313149cf65badb1a0d1a1d"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#ae2f5ee4e88313149cf65badb1a0d1a1d">momentumAmount</a> = 35f</td></tr>
<tr class="memdesc:ae2f5ee4e88313149cf65badb1a0d1a1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">How much momentum gets applied when the press is released after dragging.  <a href="#ae2f5ee4e88313149cf65badb1a0d1a1d">More...</a><br /></td></tr>
<tr class="separator:ae2f5ee4e88313149cf65badb1a0d1a1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="properties"></a>
Properties</h2></td></tr>
<tr class="memitem:a91973f8d88f6e524049be79d913ac7fe"><td class="memItemLeft" align="right" valign="top">Vector2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_u_i_draggable_camera.html#a91973f8d88f6e524049be79d913ac7fe">currentMomentum</a><code> [get, set]</code></td></tr>
<tr class="memdesc:a91973f8d88f6e524049be79d913ac7fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Current momentum, exposed just in case it's needed.  <a href="#a91973f8d88f6e524049be79d913ac7fe">More...</a><br /></td></tr>
<tr class="separator:a91973f8d88f6e524049be79d913ac7fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Works together with <a class="el" href="class_u_i_drag_camera.html" title="Allows dragging of the camera object and restricts camera&#39;s movement to be within bounds of the area ...">UIDragCamera</a> script, allowing you to drag a secondary camera while keeping it constrained to a certain area. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a0bb55aad206ac90c3da93dbbf42499ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool UIDraggableCamera.ConstrainToBounds </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>immediate</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constrain the current camera's position to be within the viewable area's bounds. </p>

</div>
</div>
<a class="anchor" id="a77ce506db4f2a956578eb4a1ca94484e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIDraggableCamera.Drag </td>
          <td>(</td>
          <td class="paramtype">Vector2&#160;</td>
          <td class="paramname"><em>delta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Drag event receiver. </p>

</div>
</div>
<a class="anchor" id="a39b7f911a2d8fdba5ce710c6f747220e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIDraggableCamera.Press </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isPressed</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate the bounds of all widgets under this game object. </p>

</div>
</div>
<a class="anchor" id="a3518faa34a2f8fa719c63ad8c977673a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void UIDraggableCamera.Scroll </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>delta</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>If the object should support the scroll wheel, do it. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a7c58d995b931d9823c6c5041f87921f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">UIDragObject.DragEffect UIDraggableCamera.dragEffect = UIDragObject.DragEffect.MomentumAndSpring</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Effect to apply when dragging. </p>

</div>
</div>
<a class="anchor" id="ae2f5ee4e88313149cf65badb1a0d1a1d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float UIDraggableCamera.momentumAmount = 35f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>How much momentum gets applied when the press is released after dragging. </p>

</div>
</div>
<a class="anchor" id="a19b0622bc6a65b9e9fbcd1f5a41b6ecc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Transform UIDraggableCamera.rootForBounds</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Root object that will be used for drag-limiting bounds. </p>

</div>
</div>
<a class="anchor" id="a4a73ef4f8b604575f03aca4f24fed2b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Vector2 UIDraggableCamera.scale = Vector2.one</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Scale value applied to the drag delta. Set X or Y to 0 to disallow dragging in that direction. </p>

</div>
</div>
<a class="anchor" id="a4926155455c09344307270395123f77f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float UIDraggableCamera.scrollWheelFactor = 0f</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Effect the scroll wheel will have on the momentum. </p>

</div>
</div>
<a class="anchor" id="a62dbd06539b8529c08c8ee47684d3214"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool UIDraggableCamera.smoothDragStart = true</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Whether the drag operation will be started smoothly, or if if it will be precise (but will have a noticeable "jump"). </p>

</div>
</div>
<h2 class="groupheader">Property Documentation</h2>
<a class="anchor" id="a91973f8d88f6e524049be79d913ac7fe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Vector2 UIDraggableCamera.currentMomentum</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">get</span><span class="mlabel">set</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Current momentum, exposed just in case it's needed. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>D:/WorkDir/Unity3D_Work/taidou_arpg/Assets/NGUI/Scripts/Interaction/UIDraggableCamera.cs</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_u_i_draggable_camera.html">UIDraggableCamera</a></li>
    <li class="footer">Generated on Sat Jan 4 2020 22:30:28 for NGUI by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9 </li>
  </ul>
</div>
</body>
</html>
